| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.GLib.Structs.MarkupParser
Description
Any of the fields in MarkupParser can be Nothing, in which case they
will be ignored. Except for the error function, any of these callbacks
can set an error; in particular the MarkupErrorUnknownElement,
MarkupErrorUnknownAttribute, and MarkupErrorInvalidContent
errors are intended to be set from these callbacks. If you set an error
from a callback, markupParseContextParse will report that error
back to its caller.
Synopsis
- newtype MarkupParser = MarkupParser (ManagedPtr MarkupParser)
- newZeroMarkupParser :: MonadIO m => m MarkupParser
- clearMarkupParserEndElement :: MonadIO m => MarkupParser -> m ()
- getMarkupParserEndElement :: MonadIO m => MarkupParser -> m (Maybe MarkupParserEndElementFieldCallback_WithClosures)
- setMarkupParserEndElement :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserEndElementFieldCallback -> m ()
- clearMarkupParserError :: MonadIO m => MarkupParser -> m ()
- getMarkupParserError :: MonadIO m => MarkupParser -> m (Maybe MarkupParserErrorFieldCallback_WithClosures)
- setMarkupParserError :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserErrorFieldCallback -> m ()
- clearMarkupParserPassthrough :: MonadIO m => MarkupParser -> m ()
- getMarkupParserPassthrough :: MonadIO m => MarkupParser -> m (Maybe MarkupParserPassthroughFieldCallback_WithClosures)
- setMarkupParserPassthrough :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserPassthroughFieldCallback -> m ()
- clearMarkupParserStartElement :: MonadIO m => MarkupParser -> m ()
- getMarkupParserStartElement :: MonadIO m => MarkupParser -> m (Maybe MarkupParserStartElementFieldCallback_WithClosures)
- setMarkupParserStartElement :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserStartElementFieldCallback -> m ()
- clearMarkupParserText :: MonadIO m => MarkupParser -> m ()
- getMarkupParserText :: MonadIO m => MarkupParser -> m (Maybe MarkupParserTextFieldCallback_WithClosures)
- setMarkupParserText :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserTextFieldCallback -> m ()
Exported types
newtype MarkupParser Source #
Memory-managed wrapper type.
Constructors
| MarkupParser (ManagedPtr MarkupParser) |
Instances
| Eq MarkupParser Source # | |
Defined in GI.GLib.Structs.MarkupParser | |
| BoxedPtr MarkupParser Source # | |
Defined in GI.GLib.Structs.MarkupParser | |
| CallocPtr MarkupParser Source # | |
Defined in GI.GLib.Structs.MarkupParser Methods boxedPtrCalloc :: IO (Ptr MarkupParser) | |
| ManagedPtrNewtype MarkupParser Source # | |
Defined in GI.GLib.Structs.MarkupParser Methods toManagedPtr :: MarkupParser -> ManagedPtr MarkupParser | |
| tag ~ 'AttrSet => Constructible MarkupParser tag Source # | |
Defined in GI.GLib.Structs.MarkupParser Methods new :: MonadIO m => (ManagedPtr MarkupParser -> MarkupParser) -> [AttrOp MarkupParser tag] -> m MarkupParser | |
newZeroMarkupParser :: MonadIO m => m MarkupParser Source #
Construct a MarkupParser struct initialized to zero.
Methods
Properties
endElement
Callback to invoke when the closing tag of an element
is seen. Note that this is also called for empty tags like
<empty/>.
clearMarkupParserEndElement :: MonadIO m => MarkupParser -> m () Source #
Set the value of the “end_element” field to Nothing.
When overloading is enabled, this is equivalent to
clear #endElement
getMarkupParserEndElement :: MonadIO m => MarkupParser -> m (Maybe MarkupParserEndElementFieldCallback_WithClosures) Source #
Get the value of the “end_element” field.
When overloading is enabled, this is equivalent to
get markupParser #endElement
setMarkupParserEndElement :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserEndElementFieldCallback -> m () Source #
Set the value of the “end_element” field.
When overloading is enabled, this is equivalent to
setmarkupParser [ #endElement:=value ]
error
Callback to invoke when an error occurs.
clearMarkupParserError :: MonadIO m => MarkupParser -> m () Source #
Set the value of the “error” field to Nothing.
When overloading is enabled, this is equivalent to
clear #error
getMarkupParserError :: MonadIO m => MarkupParser -> m (Maybe MarkupParserErrorFieldCallback_WithClosures) Source #
Get the value of the “error” field.
When overloading is enabled, this is equivalent to
get markupParser #error
setMarkupParserError :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserErrorFieldCallback -> m () Source #
Set the value of the “error” field.
When overloading is enabled, this is equivalent to
setmarkupParser [ #error:=value ]
passthrough
Callback to invoke for comments, processing instructions
and doctype declarations; if you're re-writing the parsed document,
write the passthrough text back out in the same position. If the
MarkupParseFlagsTreatCdataAsText flag is not set, this function is also
called for CDATA marked sections.
clearMarkupParserPassthrough :: MonadIO m => MarkupParser -> m () Source #
Set the value of the “passthrough” field to Nothing.
When overloading is enabled, this is equivalent to
clear #passthrough
getMarkupParserPassthrough :: MonadIO m => MarkupParser -> m (Maybe MarkupParserPassthroughFieldCallback_WithClosures) Source #
Get the value of the “passthrough” field.
When overloading is enabled, this is equivalent to
get markupParser #passthrough
setMarkupParserPassthrough :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserPassthroughFieldCallback -> m () Source #
Set the value of the “passthrough” field.
When overloading is enabled, this is equivalent to
setmarkupParser [ #passthrough:=value ]
startElement
Callback to invoke when the opening tag of an element
is seen. The callback's attributeNames and attributeValues parameters
are Nothing-terminated.
clearMarkupParserStartElement :: MonadIO m => MarkupParser -> m () Source #
Set the value of the “start_element” field to Nothing.
When overloading is enabled, this is equivalent to
clear #startElement
getMarkupParserStartElement :: MonadIO m => MarkupParser -> m (Maybe MarkupParserStartElementFieldCallback_WithClosures) Source #
Get the value of the “start_element” field.
When overloading is enabled, this is equivalent to
get markupParser #startElement
setMarkupParserStartElement :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserStartElementFieldCallback -> m () Source #
Set the value of the “start_element” field.
When overloading is enabled, this is equivalent to
setmarkupParser [ #startElement:=value ]
text
Callback to invoke when some text is seen (text is always
inside an element). Note that the text of an element may be spread
over multiple calls of this function. If the
MarkupParseFlagsTreatCdataAsText flag is set, this function is also
called for the content of CDATA marked sections.
clearMarkupParserText :: MonadIO m => MarkupParser -> m () Source #
Set the value of the “text” field to Nothing.
When overloading is enabled, this is equivalent to
clear #text
getMarkupParserText :: MonadIO m => MarkupParser -> m (Maybe MarkupParserTextFieldCallback_WithClosures) Source #
Get the value of the “text” field.
When overloading is enabled, this is equivalent to
get markupParser #text
setMarkupParserText :: MonadIO m => MarkupParser -> FunPtr C_MarkupParserTextFieldCallback -> m () Source #
Set the value of the “text” field.
When overloading is enabled, this is equivalent to
setmarkupParser [ #text:=value ]